package org.mcclone.jr.spark.fs;

import org.apache.spark.sql.SparkSession;
import org.apache.spark.sql.types.StructType;

public class ParquetReader {

    public static void main(String[] args) {
        SparkSession spark = SparkSession
                .builder()
                .master("local")
                .appName("JavaStructuredKafkaWordCount")
                .getOrCreate();
        spark.conf().set("spark.sql.streaming.metricsEnabled", "false");
        StructType userSchema = new StructType()
                .add("name", "string")
                .add("type", "string");
        spark.readStream().schema(userSchema)
                .parquet("hdfs://ha:9000/data/person.parquet")
                .writeStream()
                .format("console")
                .start();


    }
}
